import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
    student[] arr = new student[3];
    Scanner in = new Scanner(System.in);
    student s1 = new student("12334","王博凯",6);
    student s2 = new student("12344","曹昊阳",7);
    student s3 = new student();
    arr[0] = s1;
    arr[1] = s2;
    for (int i = 0;;) {
        System.out.println("请输入学生信息:");
        System.out.print("ID:");
        s3.setId(in.next());
        System.out.print("姓名:");
        s3.setName(in.next());
        System.out.print("年龄:");
        s3.setAge(in.nextInt());
        arr[arr.length - 1] = s3;
            if (s3.getId().equals(arr[i].getId())) {
                System.out.println("学号重复!请重新输入!");
            }else {
                i++;
                break;
            }
    }
        for (int j = 0; j < arr.length; j++) {
            System.out.println("学生信息:");
            System.out.print("ID:");
            System.out.println(arr[j].getId());
            System.out.print("姓名:");
            System.out.println(arr[j].getName());
            System.out.print("年龄:");
            System.out.println(arr[j].getAge());
        }
        System.out.println("请输入你要删除学生的id:");
        String d_id = in.next();
        for (int m = 0; m < arr.length; m++) {
            if(d_id.equals(arr[m].getId())){

            }
        }
    }
}